program to find the difference between smallest and largest value in an array